home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / debug / checkstack.readme < prev    next >
Encoding:
Text File  |  2000-11-02  |  3.3 KB  |  73 lines

  1. Short:    CheckStack tool for WarpUP including Source
  2. Author:   SteffenH@hyperion-software.de
  3. Uploader: SteffenH@hyperion-software.de
  4. Type:     dev/debug
  5.  
  6. This is a tiny tool useful for debugging (including Source). This is
  7. interesting for people developing PPC Software and for Beta testers (to be
  8. able to give the Developers very detailed bugreports).
  9. If you get a PPC Crash requester due to a bug in your program, you can do:
  10.  
  11. gcc-WarpOS: checkstack <Address of the Crash> <A number>
  12. StormC or vbcc-WarpOS or StormC-gcc: checkpo <Address of the Crash> <A number>
  13.  
  14. The "Address of the Crash" is the number in the r1 register (listed in the
  15. Crash Requester). There are two different tools, as gcc-WarpOS uses internally
  16. System V ABI, while the other compilers use PowerOpen.
  17.  
  18. You then get a stacktrace of <A number> deep output (each address points to one
  19. step in the calling-hierarchy of the crash). If the hierarchy ends (you are at
  20. top level) checkstack/checkpo aborts in advance. 
  21.  
  22. Then you do: (memowner is not included in this archive, you need it seperately)
  23.  
  24. memowner <The Address checkstack/checkpo did output>
  25.  
  26. for all of them. For each you get an output like 
  27.  
  28. Address  - Owner                                                     
  29. --------   -----                                                     
  30. 090A7464 - in SegList  of MyProgramPPC   Hunk 0001 Offset 0015b47c   
  31. 090A7464 - in SegList  of Process  0x08BF8160: Shell Process (MyProgramPPC)
  32.  
  33. Then you do (or if you are a Betatester the developer of the program does, after
  34. you gave him the output of the memowner-calling, note that the developer needs
  35. to compile the program with debugging support in order for this to work):
  36.  
  37. For PowerOpen-based-Compilers: (FindHit is not included, you need to get it seperately)
  38.  
  39. FindHit <Program Name> <Hunk> <Offset>
  40.  
  41. (You will get the source line of the code JUST AFTER the function which CALLED the crashed function).
  42.  
  43. For gcc-WarpOS (not StormC-gcc !!! StormC-gcc is PowerOpen bassed and uses FindHit !!!)
  44.  
  45. pobjdump -d MyProgramPPC.woself --start-address = <Offset>
  46.  
  47. Here you get directly the address of the function which called the crashed function.
  48. You only get an offset into the ASM code of the function and the name of the function,
  49. and not the source code line like for PowerOpen-based compilers.
  50.  
  51. It is important that (for gcc-WarpOS) you did call the program with the executable,
  52. which was got by elf2exe2 (the normal thing for gcc-WarpOS compiled programs). But
  53. pobjdump gets the WarpOS-Elf as parameter. It is of course important that exe and
  54. WarpOS-ELF are from the same version of the source code, else it won't work.
  55.  
  56. To use this debugging-help you need one more thing installed, BTW: You need segtracker,
  57. which is not included in this archive.
  58.  
  59. In case of any questions feel free to pass me an email to SteffenH@hyperion-software.de
  60. or MagicSN@Birdland.es.bawue.de
  61.  
  62.  
  63. ============================= Archive contents =============================
  64.  
  65. Original  Packed Ratio    Date     Time    Name
  66. -------- ------- ----- --------- --------  -------------
  67.      427     245 42.6% 15-Sep-00 17:11:34  checkpo.c
  68.    33368   16533 50.4% 15-Sep-00 17:12:54  checkstack
  69.      389     237 39.0% 15-Sep-00 17:12:52  checkstack.c
  70.    33408   16532 50.5% 15-Sep-00 17:12:22  checkpo
  71. -------- ------- ----- --------- --------
  72.    67592   33547 50.3% 16-Sep-100 17:59:44   4 files
  73.